<nz-collapseset>
  <nz-collapse [nzTitle]="panels.name" [nzActive]="panels.active" [nzDisabled]="panels.disabled">
    <form nz-form [nzLayout]="'inline'">

      <div style="margin-bottom: 12px" nz-row>

        <div nz-form-label nz-col [nzSpan]="3">
          <label>计划/方案上传时间</label>
        </div>

        <div nz-form-control nz-col [nzSpan]="4">
          <nz-input [(ngModel)]="maintenancePlanBean.startDate" name="startDate"></nz-input>
        </div>

        <div nz-form-label nz-col [nzSpan]="2">
          <label>计划/方案名称</label>
        </div>
        <div nz-form-control nz-col [nzSpan]="4">
          <nz-input [(ngModel)]="maintenancePlanBean.discription" name="discription"></nz-input>
        </div>
        <button nz-button nz-col style="margin-left: 40px;" [nzSize]="'large'" [nzType]="'primary'" (click)="query()">查询</button>
      </div>
    </form>
  </nz-collapse>
</nz-collapseset>
<ul nz-menu [nzMode]="'horizontal'">
  <li nz-menu-item (click)="add(title, content, footer)">
    <i class="anticon anticon-plus"></i>添加</li>
  <li nz-menu-item (click)="delete()">
    <i class="anticon anticon-delete"></i>删除</li>
</ul>
<nz-table #nzTable [nzDataSource]="data" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="displayDataChange($event)">
  <thead nz-thead>
    <tr>
      <th nz-th [nzCheckbox]="true">
        <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
        </label>
      </th>
      <th nz-th>
        <span>计划/方案名称</span>
      </th>
      <th nz-th>
        <span>上传日期</span>
      </th>
      <th nz-th>
        <span>计划开始日期</span>
      </th>
      <th nz-th>
        <span>计划结束日期</span>
      </th>
      <th nz-th>
        <span>文件</span>
      </th>
    </tr>
  </thead>
  <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let datas of data">
      <td nz-td [nzCheckbox]="true">
        <label nz-checkbox [nzDisabled]="datas.disabled" [(ngModel)]="datas.checked" (ngModelChange)="refreshStatus($event)">
        </label>
      </td>
      <td nz-td>
        {{datas.discription}}
      </td>
      <td nz-td>
        {{datas.startDate}}
      </td>
      <td nz-td>
        {{datas.planStartDate}}
      </td>
      <td nz-td>
        {{datas.planEndDate}}
      </td>
      <td nz-td>
        <span style="margin-right: 8px;" *ngFor="let im of showImageList(datas.url)">
          <a *ngIf="datas!=null" style="height: 60px;width: 60px" href="{{config.IP+config.API.getUpload+'/'+im}}">{{im}}</a>
        </span>
      </td>
    </tr>
  </tbody>
</nz-table>
<nz-pagination [nzPageIndex]="maintenancePlanBean.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger (nzPageSizeChange)="nzPageSizeChange($event)"
  (nzPageIndexChange)="nzPageIndexChange($event)" (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="maintenancePlanBean.pageSize"></nz-pagination>

<ng-template #title>
  <span>添加</span>
</ng-template>
<ng-template #content>
  <maintenance-plan-add-page (outValue)="addCall($event)"></maintenance-plan-add-page>
</ng-template>
<ng-template #footer>
</ng-template>

<!-- 查看图片-->
<!-- <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible=false">
  <ng-template #modalContent>
    <img [src]="previewImage" [ngStyle]="{ 'width': '100%' }" />
  </ng-template>
</nz-modal> -->
